package com.scraper.service.impl;

import java.util.List;

import com.scraper.dao.AgencyDAO;
import com.scraper.model.Agency;
import com.scraper.service.AgencyManager;

public class AgencyManagerImpl implements AgencyManager{
	
	private AgencyDAO agencyDAO;

	public void create(Agency agency) {
		agencyDAO.saveOrUpdate(agency);
	}

	public void delete(Agency agency) {
		agencyDAO.delete(agency);
	}

	public Agency getAgencyByID(Integer id) {
		return agencyDAO.get(id);
	}

	public List<Agency> getAgencyList() {
		return agencyDAO.list();
	}

	public Agency getByName(String name) {
		return agencyDAO.getByAgencyName(name);
	}

	public AgencyDAO getAgencyDAO() {
		return agencyDAO;
	}

	public void setAgencyDAO(AgencyDAO agencyDAO) {
		this.agencyDAO = agencyDAO;
	}
	
}
